//
//  TipsAlertView.m
//

#import "TipsAlertView.h"
#import "ProtocolAgreeView.h"

@implementation TipsAlertView

- (instancetype)initWithFrame:(CGRect)frame withTitleStr:(NSString *)title withCancelStr:(NSString *)cancelStr withSureStr:(NSString *)sureStr{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = kBACK_SHADOWCOLOR;
        
        CGFloat kAlertViewWidth = kScreenWidth  - 120;
        
        CGSize size = [StringUtil textSizeWithText:title font:[UIFont fontWithName:kFuturaMedium size:13] numberOfLines:0 lineSpacing:3 constrainedWidth:kAlertViewWidth - DimensionBaseIphone6(24) - DimensionBaseIphone6(24)];

        
        CGFloat alertH = DimensionBaseIphone6(33 + 25 + 44 + size.height + 2);
        
        self.alertView = [[UIView alloc]init];
        self.alertView.frame = CGRectMake(60, (kScreenHeight - alertH)/2,kScreenWidth - 120,alertH);
        self.alertView.backgroundColor = [UIColor whiteColor];
        [self addSubview:self.alertView];
        self.alertView.layer.cornerRadius = 10;
        self.alertView.layer.masksToBounds = YES;
        
        
        UILabel *titleLab = [Utility createLabel:[UIFont fontWithName:kFuturaMedium size: 13] color:[UIColor colorWithHexString:@"#022D06"]];
        titleLab.text = esString(title);
        titleLab.textAlignment = 1;
        titleLab.numberOfLines = 0;
        titleLab.frame = CGRectMake(DimensionBaseIphone6(24), DimensionBaseIphone6(33), kAlertViewWidth - DimensionBaseIphone6(48), DimensionBaseIphone6(size.height + 2));
        [self.alertView addSubview:titleLab];
        
        self.cancelButton = [[UIButton alloc]init];
        [self.cancelButton setTitle:esString(cancelStr) forState:UIControlStateNormal];
        [self.cancelButton setTitleColor:[UIColor colorWithHexString:@"#638473"] forState:UIControlStateNormal];
        self.cancelButton.titleLabel.font = [UIFont fontWithName:kFuturaMedium size:14];
        [self.cancelButton addTarget:self action:@selector(clickCancelBtn) forControlEvents:UIControlEventTouchUpInside];
        
        self.sureButton = [[UIButton alloc]init];
        [self.sureButton setTitle:esString(sureStr) forState:UIControlStateNormal];
        [self.sureButton setTitleColor:kButtonRedColor forState:UIControlStateNormal];
        self.sureButton.titleLabel.font = [UIFont fontWithName:kFuturaMedium size:14];
        [self.sureButton addTarget:self action:@selector(clickSureBtn) forControlEvents:UIControlEventTouchUpInside];
    
        
        UIView *line1 = [[UIView alloc]init];
        [self.alertView addSubview:line1];
        line1.backgroundColor = kLineColor;
        
        UIView *line2 = [[UIView alloc]init];
        
        line2.backgroundColor = kLineColor;
        
        
        [self.alertView addSubview:self.cancelButton];
        [self.alertView addSubview:self.sureButton];
        [self.alertView addSubview:line1];
        [self.alertView addSubview:line2];
        
        self.cancelButton.frame = CGRectMake(0, alertH - DimensionBaseIphone6(44), kAlertViewWidth/2, DimensionBaseIphone6(44));
        self.sureButton.frame = CGRectMake(kAlertViewWidth/2, self.cancelButton.top, kAlertViewWidth/2, DimensionBaseIphone6(44));
        
        line1.frame= CGRectMake(0, self.cancelButton.top - 1, kAlertViewWidth, 1);
        line2.frame= CGRectMake(kAlertViewWidth/2, line1.bottom, 1, DimensionBaseIphone6(44));
        
        
        
    }
    return self;
    
}


- (void)clickCancelBtn{
    if (_clickCancelBlock) {
        _clickCancelBlock();
    }
    [self removeFromSuperview];
}

- (void)clickSureBtn{
    if (_clickSureBlock) {
        _clickSureBlock();
    }
    [self removeFromSuperview];
}



@end

@implementation TipsAlertTokenLoseView

- (instancetype)initWithFrame:(CGRect)frame withTitleStr:(NSString *)title withSureStr:(NSString *)sureStr{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = kBACK_SHADOWCOLOR;
        
        CGFloat kAlertViewWidth = kScreenWidth  - 120;
        
        CGSize size = [StringUtil textSizeWithText:title font:[UIFont fontWithName:kFuturaMedium size:13] numberOfLines:0 lineSpacing:3 constrainedWidth:kAlertViewWidth - DimensionBaseIphone6(24) - DimensionBaseIphone6(24)];

        
        CGFloat alertH = DimensionBaseIphone6(33 + 25 + 44 + size.height + 2);
        
        self.alertView = [[UIView alloc]init];
        self.alertView.frame = CGRectMake(60, (kScreenHeight - alertH)/2,kScreenWidth - 120,alertH);
        self.alertView.backgroundColor = [UIColor whiteColor];
        [self addSubview:self.alertView];
        self.alertView.layer.cornerRadius = 10;
        self.alertView.layer.masksToBounds = YES;
        
        
        UILabel *titleLab = [Utility createLabel:[UIFont fontWithName:kFuturaMedium size: 13] color:[UIColor colorWithHexString:@"#022D06"]];
        titleLab.text = esString(title);
        titleLab.textAlignment = 1;
        titleLab.numberOfLines = 0;
        titleLab.frame = CGRectMake(DimensionBaseIphone6(24), DimensionBaseIphone6(33), kAlertViewWidth - DimensionBaseIphone6(48), DimensionBaseIphone6(size.height + 2));
        [self.alertView addSubview:titleLab];
        
        self.sureButton = [[UIButton alloc]init];
        [self.sureButton setTitle:esString(sureStr) forState:UIControlStateNormal];
        [self.sureButton setTitleColor:kButtonRedColor forState:UIControlStateNormal];
        self.sureButton.titleLabel.font = [UIFont fontWithName:kFuturaMedium size:14];
        [self.sureButton addTarget:self action:@selector(clickSureBtn) forControlEvents:UIControlEventTouchUpInside];
        [self.alertView addSubview:self.sureButton];
        
        UIView *line1 = [[UIView alloc]init];
        [self.alertView addSubview:line1];
        line1.backgroundColor = kLineColor;
        [self.alertView addSubview:line1];
       

        self.sureButton.frame = CGRectMake(0, alertH - DimensionBaseIphone6(44), kAlertViewWidth, DimensionBaseIphone6(44));
        
        line1.frame= CGRectMake(0, self.sureButton.top - 1, kAlertViewWidth, 1);
        
        
        
        
    }
    return self;
    
}

- (void)clickSureBtn{
    if (_clickSureBlock) {
        _clickSureBlock();
    }
    [self removeFromSuperview];
}



@end


@implementation TipsAlertGoOutView

- (instancetype)initWithFrame:(CGRect)frame withTitleStr:(NSString *)title WithDescStr:(nonnull NSString *)descStr withCancelStr:(nonnull NSString *)cancelStr withSureStr:(nonnull NSString *)sureStr{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = kBACK_SHADOWCOLOR;
        
        UIImage *img = [UIImage imageNamed:@"icon_gooutBg"];
        self.alertView = [[UIView alloc]init];
        self.alertView.frame = CGRectMake(60, (kScreenHeight - DimensionBaseIphone6(img.size.height))/2,kScreenWidth - 120,DimensionBaseIphone6(img.size.height));
        [self addSubview:self.alertView];
        
        UIImageView *imgV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.alertView.size.width, self.alertView.size.height)];
        imgV.userInteractionEnabled = YES;
        imgV.image = img;
        [self.alertView addSubview:imgV];
        
        UIButton *deleteBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.alertView.frame.size.width - 30, 0, 30, 30)];
        [deleteBtn setImage:[UIImage imageNamed:@"icon_closeBig"] forState:UIControlStateHighlighted];
        [deleteBtn setImage:[UIImage imageNamed:@"icon_closeBig"] forState:UIControlStateSelected];
        [deleteBtn setImage:[UIImage imageNamed:@"icon_closeBig"] forState:UIControlStateNormal];
        [deleteBtn addTarget:self action:@selector(clickCancelBtn) forControlEvents:UIControlEventTouchUpInside];
        [self.alertView addSubview:deleteBtn];
        
        
        UILabel *titleLab = [Utility createLabel:[UIFont fontWithName:kFuturaBold size: 15] color:[UIColor colorWithHexString:@"#FFF4C4"]];
        titleLab.text = esString(title);
        titleLab.textAlignment = 1;
        titleLab.frame = CGRectMake(0, DimensionBaseIphone6(55), self.alertView.size.width, DimensionBaseIphone6(20));
        [self.alertView addSubview:titleLab];
        
        UILabel *descLab = [Utility createLabel:[UIFont fontWithName:kFuturaMedium size: 15] color:[UIColor colorWithHexString:@"#FFF4C4"]];
        descLab.textAlignment = 1;
        descLab.numberOfLines = 0;
        descLab.frame = CGRectMake(DimensionBaseIphone6(20), DimensionBaseIphone6(10) + titleLab.bottom, self.alertView.size.width - DimensionBaseIphone6(40), DimensionBaseIphone6(50));
        [self.alertView addSubview:descLab];
        descLab.attributedText = [StringUtil setText:esString(descStr) lineSpacing:5 font:[UIFont fontWithName:kFuturaMedium size: 15] withAlignment:1];
        
        self.cancelButton = [[UIButton alloc]init];
        [self.cancelButton setTitle:esString(cancelStr) forState:UIControlStateNormal];
        [self.cancelButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.cancelButton.titleLabel.font = [UIFont fontWithName:kFuturaMedium size:15];
        [self.cancelButton addTarget:self action:@selector(clickCancelBtn) forControlEvents:UIControlEventTouchUpInside];
        [self.cancelButton setBackgroundImage:[UIImage imageNamed:@"icon_goout"] forState:UIControlStateNormal];
        [self.cancelButton setBackgroundImage:[UIImage imageNamed:@"icon_goout"] forState:UIControlStateSelected];
        [self.cancelButton setBackgroundImage:[UIImage imageNamed:@"icon_goout"] forState:UIControlStateHighlighted];
        
        
        self.sureButton = [[UIButton alloc]init];
        [self.sureButton setTitle:esString(sureStr) forState:UIControlStateNormal];
        [self.sureButton setTitleColor:kButtonRedColor forState:UIControlStateNormal];
        self.sureButton.titleLabel.font = [UIFont fontWithName:kFuturaMedium size:15];
        [self.sureButton addTarget:self action:@selector(clickSureBtn) forControlEvents:UIControlEventTouchUpInside];
    
        
        [self.alertView addSubview:self.cancelButton];
        [self.alertView addSubview:self.sureButton];
        
        self.cancelButton.frame = CGRectMake(DimensionBaseIphone6(25), descLab.bottom + DimensionBaseIphone6(20), self.alertView.size.width - DimensionBaseIphone6(50), DimensionBaseIphone6(kGeneralHeight));
        self.sureButton.frame = CGRectMake((self.alertView.size.width - DimensionBaseIphone6(60))/2, self.cancelButton.bottom, DimensionBaseIphone6(60), DimensionBaseIphone6(40));
        
        UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, self.sureButton.bottom - DimensionBaseIphone6(13), DimensionBaseIphone6(50), 1)];
        line.backgroundColor = kButtonRedColor;
        [self.alertView addSubview:line];
        line.centerX = self.sureButton.centerX;
        
    }
    return self;
    
}


- (void)clickCancelBtn{
    if (_clickCancelBlock) {
        _clickCancelBlock();
    }
    [self removeFromSuperview];
}

- (void)clickSureBtn{
    if (_clickSureBlock) {
        _clickSureBlock();
    }
    [self removeFromSuperview];
}



@end


@implementation TipsAlertCancelView

- (instancetype)initWithFrame:(CGRect)frame withTitleStr:(NSString *)title WithDescStr:(nonnull NSString *)descStr withCancelStr:(nonnull NSString *)cancelStr withSureStr:(nonnull NSString *)sureStr{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = kBACK_SHADOWCOLOR;
        
        UIImage *img = [UIImage imageNamed:@"icon_clearBgv"];
        
        CGFloat kHeight = img.size.height + 40;
        self.alertView = [[UIView alloc]init];
        self.alertView.frame = CGRectMake(60, (kScreenHeight - DimensionBaseIphone6(kHeight))/2,kScreenWidth - 120,DimensionBaseIphone6(kHeight));
        [self addSubview:self.alertView];
        
        UIImageView *imgV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.alertView.size.width, self.alertView.size.height)];
        imgV.userInteractionEnabled = YES;
        imgV.image = img;
        [self.alertView addSubview:imgV];
        
        UIButton *deleteBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.alertView.frame.size.width - 30, 0, 30, 30)];
        [deleteBtn setImage:[UIImage imageNamed:@"icon_closeBig"] forState:UIControlStateHighlighted];
        [deleteBtn setImage:[UIImage imageNamed:@"icon_closeBig"] forState:UIControlStateSelected];
        [deleteBtn setImage:[UIImage imageNamed:@"icon_closeBig"] forState:UIControlStateNormal];
        [deleteBtn addTarget:self action:@selector(clickCancelBtn) forControlEvents:UIControlEventTouchUpInside];
        [self.alertView addSubview:deleteBtn];
        
        UILabel *titleLab = [Utility createLabel:[UIFont fontWithName:kFuturaBold size: 15] color:[UIColor colorWithHexString:@"#FFF4C4"]];
        
        titleLab.textAlignment = 1;
        titleLab.frame = CGRectMake(0, DimensionBaseIphone6(60), self.alertView.size.width, DimensionBaseIphone6(20));
        [self.alertView addSubview:titleLab];
        titleLab.text = esString(title);
        
        UILabel *descLab = [Utility createLabel:[UIFont fontWithName:kFuturaMedium size: 15] color:[UIColor colorWithHexString:@"#FFF4C4"]];
        descLab.textAlignment = 1;
        descLab.numberOfLines = 0;
        [self.alertView addSubview:descLab];
        descLab.attributedText = [StringUtil setText:esString(descStr) lineSpacing:5 font:[UIFont fontWithName:kFuturaMedium size: 15] withAlignment:1];
        CGSize size = [StringUtil textSizeWithText:descStr font:[UIFont fontWithName:kFuturaMedium size: 15] numberOfLines:0 lineSpacing:5 constrainedWidth:self.alertView.size.width - DimensionBaseIphone6(20)];
        
        descLab.frame = CGRectMake(DimensionBaseIphone6(10), titleLab.bottom + DimensionBaseIphone6(15), self.alertView.size.width - DimensionBaseIphone6(20), DimensionBaseIphone6(size.height + 5));
        
        self.cancelButton = [[UIButton alloc]init];
        [self.cancelButton setTitle:esString(cancelStr) forState:UIControlStateNormal];
        [self.cancelButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.cancelButton.titleLabel.font = [UIFont fontWithName:kFuturaMedium size:15];
        [self.cancelButton addTarget:self action:@selector(clickCancelBtn) forControlEvents:UIControlEventTouchUpInside];
        [self.cancelButton setBackgroundImage:[UIImage imageNamed:@"icon_goout"] forState:UIControlStateNormal];
        [self.cancelButton setBackgroundImage:[UIImage imageNamed:@"icon_goout"] forState:UIControlStateSelected];
        [self.cancelButton setBackgroundImage:[UIImage imageNamed:@"icon_goout"] forState:UIControlStateHighlighted];
        
        
        self.sureButton = [[UIButton alloc]init];
        [self.sureButton setTitle:esString(sureStr) forState:UIControlStateNormal];
        [self.sureButton setTitleColor:kButtonRedColor forState:UIControlStateNormal];
        self.sureButton.titleLabel.font = [UIFont fontWithName:kFuturaMedium size:15];
        [self.sureButton addTarget:self action:@selector(clickSureBtn) forControlEvents:UIControlEventTouchUpInside];
    
        
        [self.alertView addSubview:self.cancelButton];
        [self.alertView addSubview:self.sureButton];
        
        self.cancelButton.frame = CGRectMake(25, descLab.bottom + DimensionBaseIphone6(20), self.alertView.size.width - 50, DimensionBaseIphone6(kGeneralHeight));
        self.sureButton.frame = CGRectMake((self.alertView.size.width - 110)/2, self.cancelButton.bottom + DimensionBaseIphone6(10), 110, DimensionBaseIphone6(40));
        
        UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, self.sureButton.bottom - DimensionBaseIphone6(13), DimensionBaseIphone6(100), 1)];
        line.backgroundColor = kButtonRedColor;
        [self.alertView addSubview:line];
        line.centerX = self.sureButton.centerX;
        
        
        NSString *textStr = @"I have read and agree to the above";
        CGRect rec = [textStr boundingRectWithSize:CGSizeMake(kScreenWidth - 32, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : [UIFont fontWithName:kFuturaMedium size:12]} context:nil];
        ProtocolAgreeView *agreeView = [[ProtocolAgreeView alloc]initWithTitle:textStr withTitleColor:[UIColor colorWithHexString:@"#79A08B"] protocol:@"" withProtocolColor:[UIColor colorWithHexString:@"#79A08B"] fontSize:13 target:self withSel:NO withAgreeImg:@"icon_sel2" withUnagreeImg:@"icon_sel1"];
        agreeView.frame = CGRectMake((self.alertView.size.width - rec.size.width - 25)/2, line.bottom + DimensionBaseIphone6(10), rec.size.width + 25, 20);
        [self.alertView addSubview:agreeView];
        
    }
    return self;
    
}
- (void)agreeViewWillAgreeProtocol:(BOOL)agree{
    self.agree = agree;
    
}

- (void)clickCancelBtn{
    if (_clickCancelBlock) {
        _clickCancelBlock();
    }
    [self removeFromSuperview];
}

- (void)clickSureBtn{
    if (!self.agree) {
        [CreaditUtilsHelper boxShowWithMessage:@"please read and agree to it"];
        return;
    }
    if (_clickSureBlock) {
        _clickSureBlock();
    }
    [self removeFromSuperview];
}



@end


@implementation TipsAlertWLView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = kBACK_SHADOWCOLOR;
        
        UIImage *img = [UIImage imageNamed:@"icon_wl"];
        
        self.alertView = [[UIView alloc]init];
        self.alertView.frame = CGRectMake(60, (kScreenHeight - DimensionBaseIphone6(img.size.height))/2,kScreenWidth - 120,DimensionBaseIphone6(img.size.height));
        [self addSubview:self.alertView];
        
        UIImageView *imgV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.alertView.size.width, self.alertView.size.height)];
        imgV.userInteractionEnabled = YES;
        imgV.image = img;
        [self.alertView addSubview:imgV];
        
        UIButton *deleteBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.alertView.frame.size.width - 30, 0, 30, 30)];
        [deleteBtn setImage:[UIImage imageNamed:@"icon_closeBig"] forState:UIControlStateHighlighted];
        [deleteBtn setImage:[UIImage imageNamed:@"icon_closeBig"] forState:UIControlStateSelected];
        [deleteBtn setImage:[UIImage imageNamed:@"icon_closeBig"] forState:UIControlStateNormal];
        [deleteBtn addTarget:self action:@selector(clickCancelBtn) forControlEvents:UIControlEventTouchUpInside];
        [self.alertView addSubview:deleteBtn];
        
        CGSize size1 = [StringUtil textSizeWithText:kWLTitleStr font:[UIFont fontWithName:kFuturaBold size:13] numberOfLines:0 lineSpacing:3 constrainedWidth:self.alertView.size.width - 10];
        
        UILabel *titleLab = [Utility createLabel:[UIFont fontWithName:kFuturaBold size: 13] color:RGB(230, 239, 195)];
        titleLab.attributedText = [StringUtil setText:kWLTitleStr lineSpacing:3 font:[UIFont fontWithName:kFuturaBold size:13] withAlignment:1];
        titleLab.numberOfLines = 0;
        titleLab.textAlignment = 1;
        titleLab.frame = CGRectMake(5, DimensionBaseIphone6(60), self.alertView.size.width - 10, DimensionBaseIphone6(size1.height));
        [self.alertView addSubview:titleLab];
        
        UILabel *descLab = [Utility createLabel:[UIFont fontWithName:kFuturaMedium size: 13] color:RGB(230, 239, 195)];
        descLab.textAlignment = 1;
        descLab.numberOfLines = 0;
        [self.alertView addSubview:descLab];
        
        descLab.attributedText = [StringUtil setText:kWLDescStr lineSpacing:3 font:[UIFont fontWithName:kFuturaMedium size: 13] withAlignment:1];
        CGSize size2 = [StringUtil textSizeWithText:kWLDescStr font:[UIFont fontWithName:kFuturaMedium size: 13] numberOfLines:0 lineSpacing:3 constrainedWidth:self.alertView.size.width - 10];
        
        descLab.frame = CGRectMake(5, titleLab.bottom + DimensionBaseIphone6(5), self.alertView.size.width - 10, DimensionBaseIphone6(size2.height + 5));
        
        UIImage *img3 = [UIImage imageNamed:@"icon_wl2"];
        UIImageView *img3View= [[UIImageView alloc] initWithFrame:CGRectMake((self.alertView.size.width - img3.size.width)/2, descLab.bottom , img3.size.width, img3.size.height)];
        img3View.image = img3;
        [self.alertView addSubview:img3View];
        
        
        self.cancelButton = [[UIButton alloc]init];
        [self.cancelButton setTitle:@"Continue" forState:UIControlStateNormal];
        [self.cancelButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.cancelButton.titleLabel.font = [UIFont fontWithName:kFuturaMedium size:13];
        [self.cancelButton addTarget:self action:@selector(clickCancelBtn) forControlEvents:UIControlEventTouchUpInside];
        [self.cancelButton setBackgroundImage:[UIImage imageNamed:@"icon_goout"] forState:UIControlStateNormal];
        [self.cancelButton setBackgroundImage:[UIImage imageNamed:@"icon_goout"] forState:UIControlStateSelected];
        [self.cancelButton setBackgroundImage:[UIImage imageNamed:@"icon_goout"] forState:UIControlStateHighlighted];
        
        
        self.sureButton = [[UIButton alloc]init];
        [self.sureButton setTitle:@"Give Up" forState:UIControlStateNormal];
        [self.sureButton setTitleColor:kButtonRedColor forState:UIControlStateNormal];
        self.sureButton.titleLabel.font = [UIFont fontWithName:kFuturaMedium size:13];
        [self.sureButton addTarget:self action:@selector(clickSureBtn) forControlEvents:UIControlEventTouchUpInside];
    
        
        [self.alertView addSubview:self.cancelButton];
        [self.alertView addSubview:self.sureButton];
        
        self.cancelButton.frame = CGRectMake(DimensionBaseIphone6(25), img3View.bottom + DimensionBaseIphone6(10), self.alertView.size.width - DimensionBaseIphone6(50), DimensionBaseIphone6(kGeneralHeight));
        self.sureButton.frame = CGRectMake((self.alertView.size.width - DimensionBaseIphone6(60))/2, self.cancelButton.bottom, DimensionBaseIphone6(60), DimensionBaseIphone6(40));
        
        UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, self.sureButton.bottom - DimensionBaseIphone6(13), DimensionBaseIphone6(50), 1)];
        line.backgroundColor = kButtonRedColor;
        [self.alertView addSubview:line];
        line.centerX = self.sureButton.centerX;
        
    }
    return self;
    
}


- (void)clickCancelBtn{
    if (_clickCancelBlock) {
        _clickCancelBlock();
    }
    [self removeFromSuperview];
}

- (void)clickSureBtn{
    if (_clickSureBlock) {
        _clickSureBlock();
    }
    [self removeFromSuperview];
}



@end
